import axios from '@/http'

export default {
    getData(){
        return axios.get(`roles`)
    },

    deleteFun(id){
        return axios.delete(`roles/${id}`)
    },

    redactd(id){
        return axios.get(`roles/${id}`)
    },

    deleteFun(id){
        return axios.delete(`roles/${id}`)
    },

    redactdate(id,cid){
        return axios.put(`roles/${id}`,cid)
    },

    addDates(id){
        return axios.post("roles", id)
    },

    allocation(){
        return axios.get(`rights/tree`)
    },

    power(id,cid){
        return axios.post(`roles/${id}/rights`, {
            cid
          })
    },

    remove(id,cid){
        return axios.delete(`roles/${id}/rights/${cid}`)
    },



}